ArcFM Responder Mobile Developer Guide
SetValueAllowingTruncateWithLog<TProperty> Method






The property to set a value
The new value of the string
Try to set a string value if too long log an error message and truncate
Syntax
'Declaration
 
Public Sub SetValueAllowingTruncateWithLog(Of TProperty)( _
   ByVal propertyLambda As System.Linq.Expressions.Expression(Of Func(Of T,TProperty)), _
   ByVal newValue As System.String _
) 
'Usage
 
Dim instance As ResponderObjectBaseGeneric(Of T)
Dim propertyLambda As System.Linq.Expressions.Expression(Of Func(Of T,TProperty))
Dim newValue As System.String
 
instance.SetValueAllowingTruncateWithLog(Of TProperty)(propertyLambda, newValue)
public void SetValueAllowingTruncateWithLog<TProperty>( 
   System.Linq.Expressions.Expression<Func<T,TProperty>> propertyLambda,
   System.string newValue
)
public procedure SetValueAllowingTruncateWithLog( 
    propertyLambda: System.Linq.Expressions.Expression;
    newValue: System.String
); 
public function SetValueAllowingTruncateWithLog( 
   propertyLambda : System.Linq.Expressions.Expression,
   newValue : System.String
);
public: void SetValueAllowingTruncateWithLog<TProperty>( 
   System.Linq.Expressions.Expression<Func<T*,TProperty*>*>* propertyLambda,
   System.string* newValue
) 
public:
void SetValueAllowingTruncateWithLoggeneric<typename TProperty>
( 
   System.Linq.Expressions.Expression<Func<T^,TProperty^>^>^ propertyLambda,
   System.String^ newValue
) 

Parameters

propertyLambda
newValue
The new value of the string

Type Parameters

TProperty
The property to set a value
Example
var object = new AlertsObject(row); object.SetValueAllowingTruncateWithLog(i => i.property, "SomeString"); Assert.That(object.property, Is.EqualTo("SomeString")); var object2 = new AlertsObject(row); object2.SetValueAllowingTruncateWithLog(i=>i.property, new string('m', 500)); // error loggged here Assert.That(object2.property, Is.EqualTo(new string('m', 200)));
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ResponderObjectBaseGeneric<T> Class
ResponderObjectBaseGeneric<T> Members

Send Feedback